<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
     <title><spring:message code="message.jieSuan.yinHangZhangHao"/><spring:message code="message.listForm.riZhi"/><spring:message code="message.button.look"/></title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp"%>
</head>

<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">

    <section class="content-header">
        <h1><spring:message code="message.listForm.riZhi"/><spring:message code="message.button.look"/></h1>
         <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i><spring:message code="message.lable.first"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.jieSuan.zhangHuGuanLi"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.jieSuan.zhangHu"/><spring:message code="message.listForm.xinXi"/><spring:message code="message.button.look"/></a></li>
        </ol>
    </section>
    
    <section class="content">
        <div class=" box box-success">
            <div class="box-body">
                <div class="input" style="margin-top:-5px;">
                	<div class="textalign1"><spring:message code="message.listForm.shenHeZhuanTai"/><spring:message code="message.yanZheng.maoHao"/></div>
                        <div class="boxinput">
                        <select class="textinput" id="auditStatus" name="auditStatus">
                          <option value=""><spring:message code="message.select.option"/></option>
                          <option value="0"><spring:message code="message.select.weishenhe"/></option> 
                          <option value="1"><spring:message code="message.jieSuan.tongGuo"/></option>
                          <option value="2"><spring:message code="message.listForm.buTongGuo"/></option>
                        </select>
                    	</div>
                    <div class="textalign1"><spring:message code="message.jieSuan.tiJiaoRiQi"/><spring:message code="message.yanZheng.maoHao"/></div>
	                <div class="boxinput"> 
                       <table style="width:100%">
                                <tr>
                                    <td style="width:50%">
                                        <input id=submitStartTime name="submitStartTime" type="text" class="textinput" placeholder="yyyy-MM-dd"
						data-date-fmt="yyyy-MM-dd" onFocus="var endDate=$dp.$('submitEndTime');WdatePicker({maxDate:'#F{$dp.$D(\'submitEndTime\')}'})" />
                                    </td>
                                    <td>&nbsp;-&nbsp;</td>
                                    <td style="width:50%">
                                        <input id="submitEndTime" name="submitEndTime" type="text" class="textinput"  placeholder="yyyy-MM-dd"
						data-date-fmt="yyyy-MM-dd" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'submitStartTime\')}'})" />
                                    </td>
                                </tr>
                            </table>
                    </div>
                    <div class="textalign1"><spring:message code="message.jieSuan.shenHeRiQi"/><spring:message code="message.yanZheng.maoHao"/></div>
	                <div class="boxinput"> 
                       <table style="width:100%">
                                <tr>
                                    <td style="width:50%">
                                        <input id=auditStartTime name="auditStartTime" type="text" class="textinput" placeholder="yyyy-MM-dd"
						data-date-fmt="yyyy-MM-dd" onFocus="var endDate=$dp.$('auditEndTime');WdatePicker({maxDate:'#F{$dp.$D(\'auditEndTime\')}'})" />
                                    </td>
                                    <td>&nbsp;-&nbsp;</td>
                                    <td style="width:50%">
                                        <input id="auditEndTime" name="auditEndTime" type="text" class="textinput"  placeholder="yyyy-MM-dd"
						data-date-fmt="yyyy-MM-dd" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'auditStartTime\')}'})" />
                                    </td>
                                </tr>
                            </table>
                    </div>
                    <div class="textalign1" >
                    <button type="button" class="btn btn-success btn-sm" onclick="search()" id="selectDicCompType"><spring:message code="message.button.seachSpacing"/></button>
                    </div>
                </div>
            </div>
        </div>
        
        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
        
        <div class=" box box-warning bottongroup">
              <a href="toHospitalAcctInfo.html" class="btn btn-default btn-sm" ><spring:message code="message.button.getBackSpacing"/></a>
             
        </div>
        
    </section>
    
    <%@ include file="/WEB-INF/component/commonJS.jsp"%>
    <script type="text/javascript">
    //绑定回车
    $('#auditStatus,#submitStartTime,#submitEndTime,#auditStartTime,#auditEndTime').bind('keydown', function(event) {
        if (event.keyCode == "13") {
            $('#selectDicCompType').click();
        }
    });	
    $("#auditStatus").focus();//加载页面光标在第一个查询框内
    
    
        $(function () {
            $("#gridlist").jqGrid({
                url: "getHospitalAcctInfoLog.html",
                mtype: "POST",
                datatype: "json",
                postData:{"bankAcctId":"${bankAcctId}"},
                autowidth: true,
                shrinkToFit:false,
                height: 280,
                colNames: ['bankAcctId',
                           '<spring:message code="message.jieSuan.yinHangZhangHao"/>',
                           '<spring:message code="message.jieSuan.shiFouMoRen"/>',
                           '<spring:message code="message.jieSuan.kaiHuRen"/> ',
                           '<spring:message code="message.jieSuan.kaiHuHang"/> ',
                           '<spring:message code="message.jieSuan.kaiHuXuKeZheng"/>',
                           '<spring:message code="message.jieSuan.kaiHuHangHangHao"/> ',
                           '<spring:message code="message.jieSuan.kaiHuHangHangMing"/>',
                           '<spring:message code="message.jieSuan.kaiHuHangQuYu"/>',
                           '<spring:message code="message.jieSuan.tiJiaoShiJian"/> ',
                           '<spring:message code="message.jieSuan.tiJiaoRen"/>',
                           '<spring:message code="message.listForm.shenHeZhuanTai"/> ',
                           '<spring:message code="message.jieSuan.auditTime"/>',
                           '<spring:message code="message.jieSuan.auditPeople"/>',
                           '<spring:message code="message.listForm.shenHeBeiZhu"/>'
                           
                           ],
                colModel: [
                    { name: 'bankAcctId', index: 'ship',hidden:true, width: 50,align:"center",sortable:false},
                    
                    { name: 'bankAcctNo', index: 'ship', width: 150,align:"center",sortable:false},
                    { name: 'isDefaultAcct', index: 'ship', width: 60,align:"center",sortable:false,
                    	formatter:function(cellvalue,opts,row){
                    		if(row.isDefaultAcct==1){
                                return "<spring:message code="message.listForm.shi"/>";
                            }else if(row.isDefaultAcct==0){
                                return "<spring:message code="message.listForm.fou"/>";
                            }else{
                                return "--";
                            }
                    	}	
                    },
                    { name: 'acctHolder', index: 'ship',width: 80,align:"center",sortable:false},
                    { name: 'depositBank', index: 'ship',hidden:true,width: 120,align:"center",sortable:false},
                    { name: 'acctApprovalPicDir', index: 'ship', width: 80,align:"center",sortable:false,
                        formatter:function(cellvalue, options, row){
                            return '<a href="javascript:showImg(\''+row.acctApprovalPicDir+'\');" style="display:inline-block;"><spring:message code="message.button.look"/></a>';
                        }
                    },
                    { name: 'depositBankNo', index: 'ship', width: 120,align:"center",sortable:false},
                    { name: 'depositBankName', index: 'ship',width: 230,align:"center",sortable:false},
                    { name: 'depositBankAreaName', index: 'ship',width: 80,align:"center",sortable:false},
                    { name: 'submitTime', index: 'ship',width: 180,align:"center",sortable:false},
                    { name: 'submitUserName', index: 'ship',width: 200,align:"center",sortable:false},
                    { name: 'auditStatusName', index: 'ship',width: 80,align:"center",sortable:false},
                    { name: 'auditTime', index: 'ship', width: 150,align:"center",sortable:false},
                    { name: 'auditUserName', index: 'ship',width: 120,align:"center",sortable:false},
                    { name: 'auditRemark', index: 'ship', width: 80,align:"center",sortable:false}
                    
                ],
                rowNum: 20,
                rowList: [10, 20, 50, 100],
                rownumbers: true,
                multiselect: false,
                pager: "#gridpage",
                viewrecords: true,
                gridComplete: function(){
    	        	 //序号列宽度自适应（参数为jqgridID）
    	               autoRNWidth("gridlist");
    	           	//数据只有一条时默认选中（参数为jqgridID）
    	               selectByOneData("gridlist");
    			},
                caption: "<spring:message code="message.listForm.riZhi"/><spring:message code="message.button.look"/><spring:message code="message.listForm.lieBiao"/>",
                jsonReader: {
                    repeatitems: false,
                    id: "bankAcctId"
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            $(window).trigger("resize");
            
        });
        
        
        /* 查询 */
        function search(page) {
            var auditStatus = $("#auditStatus").val();
            var submitStartTime = $("#submitStartTime").val();
            var submitEndTime = $("#submitEndTime").val();
            var auditStartTime = $("#auditStartTime").val();
            var auditEndTime = $("#auditEndTime").val();
            $("#gridlist").jqGrid("clearGridData");
                $("#gridlist").jqGrid('setGridParam',{  
                mtype: "POST",
                datatype:'json',
                postData:{
                    "auditStatus":auditStatus,
                    "submitStartTime":submitStartTime,
                    "submitEndTime":submitEndTime,
                    "auditStartTime":auditStartTime,
                    "auditEndTime":auditEndTime
                },
                page : (page || 1)
            }).trigger("reloadGrid"); //重新载入  
        }
        
        //  显示许可证
        function showImg(imgPath) {
            var url = "${ctx}/acctInfo/toImg.html";
            $.HN.dialog.open({
               "id": "showImg",
               "title": "<spring:message code="message.listForm.XuKeZheng"/>", 
               "url": url, 
               "data": {"imgPath" : imgPath}, 
               "width": 800, 
               "height": 400, 
               "closefunc":function(params) {
                   if (params) {
                       
                   }
               }
           }); 
        }
        
    </script>
</body>
</html>